import type { UnitModel, UnitType } from '../types/unit-model'

import { UrlPrefixEnum } from '@wlydfe/service'
import http from '@/service'

import { UNIT_REQUEST_PARAMS } from '../types/unit-model'

export const asyncPriceTypes = (type: UnitType) => {
  return http.post<UnitModel[]>(
    {
      url: '/pricingType/appNoAuth/query',
      data: UNIT_REQUEST_PARAMS[type],
    },
    {
      urlPrefix: UrlPrefixEnum.CTP_APP,
    },
  )
}
